package com.itheima.auth.config;

import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

/**
 * 微信开放平台OAuth2配置
 */
@Data
@Component
@ConfigurationProperties(prefix = "wechat.oauth2")
public class WechatOAuth2Properties {
    
    /**
     * 微信开放平台AppID
     */
    private String appId;
    
    /**
     * 微信开放平台AppSecret
     */
    private String appSecret;
    
    /**
     * 授权回调域名
     */
    private String redirectUri;
    
    /**
     * 授权scope（默认snsapi_login）
     */
    private String scope = "snsapi_login";
    
    /**
     * 微信授权URL
     */
    private String authorizeUrl = "https://open.weixin.qq.com/connect/qrconnect";
    
    /**
     * 获取access_token的URL
     */
    private String accessTokenUrl = "https://api.weixin.qq.com/sns/oauth2/access_token";
    
    /**
     * 获取用户信息的URL
     */
    private String userInfoUrl = "https://api.weixin.qq.com/sns/userinfo";
}

